﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DataTier;

namespace DataServices
{
    [ServiceContract(Namespace = WCFSettings.Namespace)]
    [XmlSerializerFormat]
    public interface IPromptMessagesService
    {
        /// <summary>
        /// Возвращает перечень подсказок для конкретной страницы
        /// </summary>
        /// <param name="namePage"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ExceptionDetail))]
        string[] GetPromptMessages(string namePage);

        
        /// <summary>
        /// Возвращает перечень подсказок для конкретной страницы
        /// </summary>
        /// <param name="namePage"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ExceptionDetail))]
        List<PromptingMessage> GetPromptMessageList(string namePage);


        /// <summary>
        /// Возвращает конкретное кообщение по его идентификатору
        /// </summary>
        /// <param name="currentUserId"></param>
        /// <param name="messageId"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ExceptionDetail))]
        PromptingMessage GetPromptMessage(int currentUserId, int messageId);


        /// <summary>
        /// Сохранение сообщения-подсказки
        /// </summary>
        /// <param name="currentUserId"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ExceptionDetail))]
        int SavePromptMessage(int currentUserId, PromptingMessage message);


        /// <summary>
        /// Удаление сообщения-подсказки
        /// </summary>
        /// <param name="currentUserId"></param>
        /// <param name="messageId"></param>
        [OperationContract]
        [FaultContract(typeof(ExceptionDetail))]
        void DeletePromptMessage(int currentUserId, int messageId);


    }
}
